summaryrefslogtreecommitdiffstats
path: root/src/httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/httpd.c')
-rw-r--r--src/httpd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/httpd.c b/src/httpd.c
index efebd75..abe025a 100644
--- a/src/httpd.c
+++ b/src/httpd.c
@@ -149,8 +149,8 @@ enum MHD_Result sc_httpd (void * cls,
content_type = "text/plain";
break;
case 'o': /* osdd.xml - opensearch description document */
- response = malloc(strlen(sc_osdd)+strlen(host));
- sprintf(response, sc_osdd, host);
+ response = malloc(strlen(sc_osdd)+strlen(host)*3);
+ sprintf(response, sc_osdd, host, host, host);
content_type = "application/opensearchdescription+xml";
break;
case 'c': /* css.css - stylesheets */
@@ -158,6 +158,11 @@ enum MHD_Result sc_httpd (void * cls,
response = sc_css;
content_type = "text/css";
break;
+ case 'f': /* favicon.ico */
+ mhdrmm = MHD_RESPMEM_PERSISTENT;
+ response = (char *) sc_ico;
+ content_type = "image/x-icon";
+ break;
case 'l': /* logs.html */
{
#ifdef SC_LOGMEM